﻿namespace MhAdmin.System;

public class ButtonPageInput : BasePageInput
{
    /// <summary>
    /// 父ID
    /// </summary>
    [Required(ErrorMessage = "ParentId不能为空")]
    public long? ParentId { get; set; }
}

/// <summary>
/// 添加按钮参数
/// </summary>
public class ButtonAddInput : SysResource
{
    /// <summary>
    /// 父ID
    /// </summary>
    [Required(ErrorMessage = "ParentId不能为空")]
    public override long? ParentId { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [Required(ErrorMessage = "Title不能为空")]
    public override string Title { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    [Required(ErrorMessage = "Code不能为空")]
    public override string Code { get; set; }
}



public class ButtonEditInput : ButtonAddInput
{
    /// <summary>
    /// ID
    /// </summary>
    [IdNotNull(ErrorMessage = "Id不能为空")]
    public override long Id { get; set; }
}

public class ButtonAddBatchRecord
{
    /// <summary>
    /// 编码
    /// </summary>
    public string Code { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int SortCode { get; set; }
}

public class ButtonAddBatchInput {

    /// <summary>
    /// 父ID
    /// </summary>
    [Required(ErrorMessage = "ParentId不能为空")]
    public long? ParentId { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [Required(ErrorMessage = "Title不能为空")]
    public string Title { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    [Required(ErrorMessage = "Code不能为空")]
    public string Code { get; set; }

    /// <summary>
    /// 批量添加记录
    /// </summary>
    public List<ButtonAddBatchRecord> Records { get; set; }
}